/**
 * 
 */
package com.wodsy.phoenix.dataobject.base;

/**
 * @author bryan
 * 将所有返回的信息格式统一
 */
public class Message implements PhoenixResponse {
	/** 
	* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
	*/ 
	private static final long serialVersionUID = -6051821448940777218L;
	
	private int state;   //0：成功     1：失败 
	
	private String msg;  //消息内容

	private Object rs;   //查询结果

	//初始为成功状态
	public Message() {
		state = 0;
		msg = "success";
		rs = null;
	}
	//错误方法时调用
	public Message(int stat ,String msg){
		this.state = stat;
		this.msg = msg;
	}
	
	public void failure(int state, String msg) {
		this.state = state;
		this.msg = msg;
	}
	
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getRs() {
		return rs;
	}

	public void setRs(Object rs) {
		this.rs = rs;
	}
}

